package com.party.course.mapper;

import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.party.course.domain.CoachInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


/**
 * 教练Mapper接口
 *
 * @author ruoyi
 * @date 2025-05-29
 */
@Mapper
public interface CoachInfoMapper  extends BaseMapper<CoachInfo>
{
    /**
     * 查询教练
     *
     * @param id 教练主键
     * @return 教练
     */
    public CoachInfo selectCoachInfoById(@Param("id") String id);

    /**
     * 查询教练列表
     *
     * @param coachInfo 教练
     * @return 教练集合
     */
    public List<CoachInfo> selectCoachInfoList(@Param("coachInfo") CoachInfo coachInfo);

    /**
     * 删除教练
     *
     * @param id 教练主键
     * @return 结果
     */
    public int deleteCoachInfoById(@Param("id") String id);

    /**
     * 批量删除教练
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCoachInfoByIds(@Param("ids") List<String> ids);

    /**
     *  根据手机号查询教练
     * @param phone
     * @return
     */
    public CoachInfo findByPhone(@Param("phone") String phone);

    /**
     * 查询未分组教练
     * @return
     */
    List<CoachInfo> findNotGroup(@Param("userId") String userId);

    List<CoachInfo> selectByIds(@Param("list") List<String> list);

    void deleteGroup(List<String> ids);

    CoachInfo findByUserId(@Param("userId") String userId);

    List<CoachInfo> findByGroup(@Param("groupId") String groupId);
}
